import Head from 'next/head';
import Examples from '../../../example-groups/RemoteFetchingExamples';

<Head>
  <title>{'React Query Example - Material React Table V3 Docs'}</title>
  <meta
    name="description"
    content="An example of Material React Table which shows how to fetch remote data and filter and paginate on a remote server with react-query"
  />
  <meta
    property="og:title"
    content="React Query with Material React Table Example"
  />
  <meta
    property="og:description"
    content="Learn best practices with React Query with Material React Table"
  />
</Head>

## React Query (Remote) Example

This is just like the [Remote Data Fetching Example](/docs/examples/remote), but react-query is used to simplify all the state management of the fetching and loading of data.

[React Query](https://tanstack.com/query/v4) is by far the best way to fetch remote data in React. It has features like caching, refetching, polling, pagination, and more that work together very well with table logic as seen in this example.

Also, be sure to check out the [Virtualized Example](/docs/examples/virtualized), which shows off the use of another TanStack library, [React Virtual](https://tanstack.com/virtual/v3), to render thousands of rows at once while still maintaining great performance.

<Examples isPage />

View Extra Storybook **[Examples](https://www.material-react-table.dev/?path=/story/prop-playground--default)**
